program degree;

{$APPTYPE CONSOLE}
var
n, k : integer;
procedure degree(n, k : integer);
  var i:integer;
  begin
    for i:=2 to k do
      n := n*n;
  end;
begin
  readln(n, k);
  degree(n, k);
  writeln(n);
  readln;
end.
 